package com.ls.service.impl;

import com.ls.dao.SourceDao;
import com.ls.entity.JsonResult;
import com.ls.entity.Source;
import com.ls.service.ISourceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;



@Service("sourceService")
public class SourceServiceImpl implements ISourceService {
	@Autowired
	private SourceDao dao;

	public JsonResult<List<Source>> findSource() {
		JsonResult<List<Source>> result = new JsonResult<List<Source>>();
		List<Source> list = dao.findSource();
		if (list != null) {
			result.setStatus(0);
			result.setData(list);
			return result;
		}
		result.setStatus(1);
		result.setMsg("查询source失败");
		return result;
	}

}
